package day06;

import java.util.Random;

public class Day06Text {
    public static void main(String[] args) {
        say();
        say("gjl");
        say("gjl",22);
        int sum = sum(5,6);
        System.out.println(sum);
        int []arr = generateArray(5);
        for (int i=0;i<arr.length;i++){
            System.out.println(arr[i]);
        }
    }
    public static void say(){
        System.out.println("大家好");
    }
    public static void say(String name){
        System.out.println("大家好，我叫"+name);
    }
    public static void say(String name,int age){
        System.out.println("大家好，我叫"+name+",今年"+"age");
    }
    public static int sum(int num1,int num2){
        int sum=num1+num2;
        return sum;
    }
    public static int [] generateArray(int n){
        Random rand = new Random();
        int [] arr=new int[n];
        for (int i=0;i<arr.length;i++){
            arr[i]= rand.nextInt(10);
        }
        return arr;
    }
}
